Location - Match

Location - Match

am 07.12.2009 06:49:04 von Rajwinder-office Singh

--001636c92b3ae1909b047a1d03aa
Content-Type: text/plain; charset=ISO-8859-1

Here is one simple looking requirement :

I want to put max-age header of value X on my home page and a value of Y for
rest of my website.

index.html is my default page but remember i cannot put


Header set Cache-Control max-age=X


As people will be hitting my website as : : http://www.abc.com and NOT
http://www.abc.com/index.html

Please suggest.


Now while trying things i came across this :


Header set Cache-Control max-age=7200


Ideally it seems that above rule will "NOT" apply to "/" alone. But it does
;-) Now try this :


Header set Cache-Control max-age=7200


This one will "NOT" apply to "/" alone. So some how character "i" matches
"/" ;-)

Thanks
Rajwinder Singh

--001636c92b3ae1909b047a1d03aa
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Here is one simple looking requirement :

I want to put max-age heade=
r of value X on my home page and a value of Y for rest of my website.
r>index.html is my default page but remember i cannot put

<Locat=
ionMatch=A0 "^/index.html">

Header set Cache-Control max-age=3DX
</LocationMatch>

As pe=
ople will be hitting my website as : : http:=
//www.abc.com
and NOT http://=
www.abc.com/index.html



Please suggest.


Now while trying things i came across this :=


<LocationMatch=A0 "^/[a-z]">
Header set Cache-Co=
ntrol max-age=3D7200
</LocationMatch>

Ideally it seems that=
above rule will "NOT" apply to "/" alone. But it does =
;-) Now try this :


<LocationMatch=A0 "^/([a-h]|[j-z]">

Header set Cache-Control max-age=3D7200

</LocationMatch>


This one will "NOT" apply to "/" alone. So some how=
character "i" matches "/" ;-)

Thanks
Rajwind=
er Singh


--001636c92b3ae1909b047a1d03aa--

Re: Location - Match

am 07.12.2009 08:01:35 von Igor Cicimov

--00504502cc2b363ff5047a1e07cd
Content-Type: text/plain; charset=ISO-8859-1

Can't you put "Header set Cache-Control max-age=X" statement inside
stanza?


On Mon, Dec 7, 2009 at 4:49 PM, Rajwinder-office Singh <
rajwinder.makkar.office@gmail.com> wrote:

> Here is one simple looking requirement :
>
> I want to put max-age header of value X on my home page and a value of Y
> for rest of my website.
>
> index.html is my default page but remember i cannot put
>
>
> Header set Cache-Control max-age=X
>

>
> As people will be hitting my website as : : http://www.abc.com and NOT
> http://www.abc.com/index.html
>
> Please suggest.
>
>
> Now while trying things i came across this :
>
>
> Header set Cache-Control max-age=7200
>

>
> Ideally it seems that above rule will "NOT" apply to "/" alone. But it does
> ;-) Now try this :
>
>
> Header set Cache-Control max-age=7200
>

>
> This one will "NOT" apply to "/" alone. So some how character "i" matches
> "/" ;-)
>
> Thanks
> Rajwinder Singh
>

--00504502cc2b363ff5047a1e07cd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Can't you put "Header set Cache-Control max-age=3DX" statemen=
t inside <Directory /> stanza?


=
On Mon, Dec 7, 2009 at 4:49 PM, Rajwinder-office Singh &l=
t;rajwinder.makkar.off=
ice@gmail.com
>
wrote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Here is one simpl=
e looking requirement :

I want to put max-age header of value X on m=
y home page and a value of Y for rest of my website.


index.html is my default page but remember i cannot put

<Loc=
ationMatch=A0 "^/index.html">

Header set Cache-Control max-age=3DX
</LocationMatch>

As pe=
ople will be hitting my website as : : t=3D"_blank">http://www.abc.com and NOT ndex.html" target=3D"_blank">http://www.abc.com/index.html



Please suggest.


Now while trying things i came across this :=


<LocationMatch=A0 "^/[a-z]">
Header set Cache-Co=
ntrol max-age=3D7200
</LocationMatch>

Ideally it seems that=
above rule will "NOT" apply to "/" alone. But it does =
;-) Now try this :



<LocationMatch=A0 "^/([a-h]|[j-z]">

Header set Cache-Control max-age=3D7200

</LocationMatch>


This one will "NOT" apply to "/" alone. So some how=
character "i" matches "/" ;-)

Thanks
olor=3D"#888888">Rajwinder Singh




--00504502cc2b363ff5047a1e07cd--

Re: Location - Match

am 07.12.2009 09:20:37 von Francis Galiegue

On Mon, Dec 7, 2009 at 06:49, Rajwinder-office Singh
wrote:
> Here is one simple looking requirement :
>
> I want to put max-age header of value X on my home page and a value of Y =
for
> rest of my website.
>
> index.html is my default page but remember i cannot put
>
>
> Header set Cache-Control max-age=3DX
>
>
> As people will be hitting my website as : : http://www.abc.com and NOT
> http://www.abc.com/index.html
>
> Please suggest.
>
>
> Now while trying things i came across this :
>
>
> Header set Cache-Control max-age=3D7200
>
>
> Ideally it seems that above rule will "NOT" apply to "/" alone. But it do=
es
> ;-) Now try this :
>
>
> Header set Cache-Control max-age=3D7200
>
>
> This one will "NOT" apply to "/" alone. So some how character "i" matches
> "/" ;-)
>
> Thanks
> Rajwinder Singh
>

Use mod_expires, it will set Cache-Control for you, and use
ExpiresDefault for the default expiry policy:

ExpiresActive On
ExpiresDefault a7200 # or ExpiresDefault "access plus 2 hours"


ExpiresDefault "access plus "


I use this configuration and it works wonderfully (I use
ExpiresDefault "now" for index.html however).

You can also use ExpiresByType, but it won't be suitable for your case, I t=
hink.

--=20

Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org